<template>
  <div>
    <button @click="openPdf">查看 PDF</button>
  </div>
</template>

<script setup>
// PDF 文件的完整 URL
const pdfUrl = 'http://localhost:8080/file/1c6b71a7-2780-401e-a54a-f32cd73b170a.pdf';

function openPdf() {
  // 在新标签页中打开 PDF 文件
  window.open(pdfUrl, '_blank');
}
</script>

<style scoped>
button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}
</style>